package cn.qingyun.gis.modules.scenes.entity;

import cn.qingyun.gis.modules.middle.handler.GeometryTypeHandler;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import org.locationtech.jts.geom.Geometry;
import org.locationtech.jts.geom.Puntal;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * @Description: 表实体对象
 * @Version: V1.0
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = false)
@TableName(value = "poi_scenario",autoResultMap = true)
@ApiModel(value = "PoiStreet对象", description = "PoiStreet对象")
public class PoiScenario implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "唯一标识")
    @TableId(value = "id", type = IdType.ASSIGN_UUID)
    private String id;

    @ApiModelProperty(value = "高德poi_id")
    private String poiId;

    @ApiModelProperty(value = "poi经度")
    private Double poiLng;

    @ApiModelProperty(value = "poi纬度")
    private Double poiLat;

    @ApiModelProperty(value = "poi名称")
    private String poiName;

    @ApiModelProperty(value = "行政地址编码")
    private String cityAdcode;

    @ApiModelProperty(value = "行政区县编码")
    private String districtAdcode;

    @ApiModelProperty(value = "地址描述")
    private String multiAddrChn;

    @ApiModelProperty(value = "高德类型编码")
    private String categoryIds;

    @ApiModelProperty(value = "高德类型编码")
    private String categoryNames;

    @ApiModelProperty(value = "场景类型（沿街商铺）")
    private String type;

    @ApiModelProperty(value = "geometry类型点")
    @TableField(typeHandler = GeometryTypeHandler.class)
    private Geometry points;

    @ApiModelProperty(value = "业务地市")
    private String regionCity;

    @ApiModelProperty(value = "业务地市编码")
    private String regionCityCode;

    @ApiModelProperty(value = "业务区县")
    private String regionDis;

    @ApiModelProperty(value = "业务地市编码")
    private String regionDisCode;

    @ApiModelProperty(value = "业务网格编码")
    private String gridCode;

    @ApiModelProperty(value = "业务网格")
    private String gridName;

    @ApiModelProperty(value = "高德面数据")
    @TableField(typeHandler = GeometryTypeHandler.class)
    private Geometry aoi;

    @ApiModelProperty(value = "电话")
    private String telephone;

    @ApiModelProperty(value = "结构化地址")
    private String address;

    @ApiModelProperty(value = "默认为0(未勘误)，1(已勘误)")
    private Integer kwState;

    /**
     * 建筑和企业的随访状态
     */
    @ApiModelProperty(value = "默认为0(未勘误)，1(已勘误)")
    private Integer kwMixState;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @ApiModelProperty(value = "修改/勘误时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    @TableField(exist = false)
    private Double distance;

    @ApiModelProperty(value = "是否是建筑")
    private Integer isBuild;

    @ApiModelProperty(value = "归属建筑")
    private String belongBuildId;

    @ApiModelProperty(value = "微网格编码")
    private String microGridCode;

    @ApiModelProperty(value = "微网格名称")
    private String microGridName;

    @ApiModelProperty(value = "道路名称")
    private String townName;

    @ApiModelProperty(value = "道路编码")
    private String townCode;
}
